/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package py.com.mblj.domain;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author markos
 */
@Entity
@Table(name = "dependencias")
@NamedQueries({@NamedQuery(name = "Dependencias.findAll", query = "SELECT d FROM Dependencias d"), @NamedQuery(name = "Dependencias.findByDcId", query = "SELECT d FROM Dependencias d WHERE d.dcId = :dcId"), @NamedQuery(name = "Dependencias.findByDcDescripcion", query = "SELECT d FROM Dependencias d WHERE d.dcDescripcion = :dcDescripcion")})
public class Dependencias implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "dc_id")
    private Integer dcId;
    @Column(name = "dc_descripcion")
    private String dcDescripcion;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "reDependencia", fetch = FetchType.LAZY)
    private List<Responsables> responsablesList;

    public Dependencias() {
    }

    public Dependencias(Integer dcId) {
        this.dcId = dcId;
    }

    public Integer getDcId() {
        return dcId;
    }

    public void setDcId(Integer dcId) {
        this.dcId = dcId;
    }

    public String getDcDescripcion() {
        return dcDescripcion;
    }

    public void setDcDescripcion(String dcDescripcion) {
        this.dcDescripcion = dcDescripcion;
    }

    public List<Responsables> getResponsablesList() {
        return responsablesList;
    }

    public void setResponsablesList(List<Responsables> responsablesList) {
        this.responsablesList = responsablesList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (dcId != null ? dcId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Dependencias)) {
            return false;
        }
        Dependencias other = (Dependencias) object;
        if ((this.dcId == null && other.dcId != null) || (this.dcId != null && !this.dcId.equals(other.dcId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "py.com.mblj.domain.Dependencias[dcId=" + dcId + "]";
    }

}
